package com.yuntongxun.ecdemo.voicechat.ui.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import com.yuntongxun.ecdemo.R;
import com.yuntongxun.ecdemo.voicechat.comman.Contants;
import com.yuntongxun.ecdemo.voicechat.ui.activity.guide.GuideTabActivity;
import com.yuntongxun.ecdemo.voicechat.util.PreferenceUtils;

/**
 * 启动页
 *
 * @author li_zhuonan
 * @version 1.0
 * @since 2016/11/14
 */

public class SplashScreenActivity extends Activity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash_screen);

//        startService(new Intent(this, MembersService.class));

        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                if (PreferenceUtils.getPrefString(SplashScreenActivity.this, Contants.Preference.user_info,"").equals("")){
                    Intent intent = new Intent(SplashScreenActivity.this, GuideTabActivity.class);
                    startActivity(intent);
                    finish();
                }else{
                    Intent intent = new Intent(SplashScreenActivity.this, com.yuntongxun.ecdemo.ui.LauncherActivity.class);
                    startActivity(intent);
                    finish();
                }


            }
        }, 1000);
    }



}
